<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<form class="well form-search" method="post" action="{:U('AdminEMallAD/normalAD')}">
			广告状态： 
			<select name="ad_status" style="width: 120px;">
				<option value="-1">全部状态</option>	
				<option value="1">投放中</option>
				<option value="0">禁用</option>
			</select> &nbsp;&nbsp;			
			关键字： 
			<input type="text" name="keywords" style="width: 200px;" value="{$formget.keyword|default=''}" placeholder="请输入关键字...">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('AdminEMallAD/normalAD')}">清空</a>
		</form>
		<form method="post" class="js-ajax-form" action="{:U('AdminEMallAD/listorders')}">
			<div class="table-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">{:L('SORT')}</button>
				<button class="btn btn-danger js-ajax-submit" type="submit" data-subcheck="true" data-action="{:U('AdminEMallAD/delete')}">{:L('DELETE')}</button>
				<a class="btn btn-primary" href="{:U('AdminEMallAD/add',array('ad_type'=>3))}">{:L('ADD_AD')}</a>
			</div>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">{:L('SORT')}</th>
						<th width="50">ID</th>
						<th>{:L('NAME')}</th>
						<th>{:L('SUB_NAME')}</th>
						<th>{:L('HOME_AD')}</th>
						<th>{:L('AD_TYPE')}</th>
						<th>{:L('STATUS')}</th>
						<th>{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="adData" item="vo">
					<tr>
						<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}" title="ID:{$vo.id}"></td>
						<td><input name="listorders[{$vo.id}]" type="text" size="3" value="{$vo.listorder}" class="input input-order valid" aria-invalid="false"></td>
						<td>{$vo.id}</td>
						<td>{$vo.ad_name}</td>
						<td>{$vo.sub_name}</td>
						<td><php>if($vo['ad_home']==1){echo '是';}else{echo '否';}</php></td>
						<td><php>if($vo['ad_type']==1){echo '幻灯广告';}else if($vo['ad_type']==2){echo '类目组广告';}else if($vo['ad_type']==3){echo '普通广告';}</php></td>
						<td><php>if($vo['ad_status']==1){echo '投放中';}else{echo '禁用';}</php></td>
						<td><a href="{:U('AdminEMallAD/manageNormalAD',array('id'=>$vo['id'],'ad_name'=>$vo['ad_name']))}">管理广告</a>  |  <a href="{:U('AdminEMallAD/edit',array('id'=>$vo['id']))}">{:L('EDIT')}</a> | <a href="{:U('AdminEMallAD/delete',array('id'=>$vo['id']))}" class="js-ajax-delete" >{:L('DELETE')}</a></td>
					</tr>
					</foreach>
				</tbody>
				<tfoot>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="50">{:L('SORT')}</th>
						<th width="50">ID</th>
						<th>{:L('NAME')}</th>
						<th>{:L('SUB_NAME')}</th>
						<th>{:L('HOME_AD')}</th>
						<th>{:L('AD_TYPE')}</th>
						<th>{:L('STATUS')}</th>
						<th>{:L('ACTIONS')}</th>
					</tr>
				</tfoot>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript">


	</script>
</body>
</html>